from selenium.webdriver.common.by import By

class UserManageLocators():

    # 添加用户按钮
    add_user = (By.XPATH, '//span[text()="添加用户"]')

    # 用户名输入框
    user_name = (By.XPATH, '//input[@placeholder="请输入用户名"]')

    # 输入框错误提示标签
    error_tips = (By.XPATH, '//div[@class="el-form-item__error"]')

    # 姓名
    name = (By.XPATH, '//input[@placeholder="请输入姓名"]')

    # 机构
    organizate = (By.XPATH, '//input[@placeholder="机构"]')

    # 过滤机构输入框
    filtrate_input = (By.XPATH, '//div[@x-placement="bottom-start"]/div/input')

    # 机构列表第二行勾选框
    check_box = (By.XPATH, '//div[@x-placement="bottom-start"]/div[2]/div[1]/div[2]/div[2]/div[1]/label/span')

    # 添加机构页面确定按钮
    add_user_sure_sub = (By.XPATH, '//form[@class="el-form"]/div[3]/div/button[1]/span')

    # 系统提示确定按钮
    system_sure = (By.XPATH, '//div[@aria-label="系统提示"]/div/div[3]/button/span')

    # user_name1
    user_name1 = (By.XPATH, '//div[@class="el-table__body-wrapper is-scrolling-none"]//div[text()="testuser1"]')

    # 用户管理列表第一条启用按钮
    enable_sub = (By.XPATH, '//div[@class="el-table__body-wrapper is-scrolling-none"]//div[text()="testuser1"]/../..//span[text()="是"]')

    # 编辑
    edit = (By.XPATH, '//div[@class="el-table__fixed-right"]//div[text()="testuser1"]/../..//span[text()="编辑"]')

    # 编辑-确定按钮
    edit_sure = (By.XPATH, '//span[@class="dialog-footer"]/button[2]/span')

    # 列表第一条数据姓名栏
    list1_name = (By.XPATH, '//div[@class="el-table__body-wrapper is-scrolling-none"]//div[text()="name1"]')

    # 列表第一条数据角色栏
    list1_role = (By.XPATH, '//div[@class="el-table__body-wrapper is-scrolling-none"]//div[text()="test_name2"]/../..//a[text()="暂无角色"]')

    # 用户名查询输入框
    query_sub = (By.XPATH, '//input[@placeholder="请输入用户名/姓名查询"]')

    # 用户权限管理标签
    label = (By.XPATH, '//span[@role="link"]')

    # 列表第一条数据人脸认证栏
    face = (By.XPATH, '//div[@class="el-table__body-wrapper is-scrolling-none"]//div[text()="test_name2"]/../../td[7]/div//span[1]/span[1]/span')

    # 已认证标签
    face_success = (By.XPATH, '//div[@class="el-table__body-wrapper is-scrolling-none"]//div[text()="test_name2"]/../..//span[text()="已认证"]')

    # input标签
    input_face = (By.XPATH, '//div[@class="avatar-uploader"]/div/input')

    # 上传成功后img标签
    success_input = (By.XPATH, '//div[@aria-label="编辑人脸信息"]//img[contains(@src, "http")]')

    # 上传人脸取消按钮
    ensure = (By.XPATH, '//div[@class="el-dialog__footer"]/span/button/span')

    # 操作按钮悬浮定位
    handle = (By.XPATH, '//button[@aria-haspopup="list"]/span')

    # 批量导入用户
    batch_import_users = (By.XPATH, '//li[text()="批量导入用户"]')

    # 导入用户input标签
    user_input = (By.XPATH, '//div[@aria-label="批量添加"]/div[2]/form/div[2]/div/div[1]/div/div/div/div/div/input')

    # 文件上传成功提示标签
    success_tips = (By.XPATH, '//a[@class="el-upload-list__item-name"]')

    # 批量导入人脸信息
    batch_import_face = (By.XPATH, '//li[text()="批量导入人脸信息"]')

    # 批量导入人脸input标签
    batch_face_input = (By.XPATH, '//div[@aria-label="批量上传人脸信息"]/div[2]/div[2]/div/div/input')

    # 批量导入确定按钮
    batch_import_sure = (By.XPATH, '//div[@aria-label="批量添加"]/div[3]/span/button[2]/span')

    # 导入按钮
    import_sub = (By.XPATH, '//div[@aria-label="批量添加"]/div[2]/form/div[2]/button/span')

    # 导入结果提示标签
    result_tips = (By.XPATH, '//div[text()="导入结果:"]/..//span[contains(text(), "成功：")]')

    # 导入数据1用户名标签
    name1 = (By.XPATH, '//div[@class="el-table__body-wrapper is-scrolling-none"]//div[text()="testuser3"]')

    # 导入数据2用户名标签
    name2 = (By.XPATH, '//div[@class="el-table__body-wrapper is-scrolling-none"]//div[text()="testuser4"]')

    # 我的工作台
    worktable = (By.XPATH, '//font[text()="我的工作台"]')

    # 教职工信息管理应用
    teacher_info_manage = (By.XPATH, '//div[text()="教职工信息管理系统"]')

    # 教职工信息管理菜单
    info_manage_menu = (By.XPATH, '//span[text()=" 入职管理"]')

    # 搜索框
    search_box = (By.XPATH, '//input[@placeholder="姓名/手机号/身份证号/邮箱/教籍号"]')

    # 列表第一条完善信息
    pertect_info1 = (By.XPATH, '//div[@class="el-table__fixed-right"]//a[contains(text(), "test_name1")]/../../..//span[text()="完善信息"]')

    # 列表第一条完善信息
    pertect_info2 = (By.XPATH, '//div[@class="el-table__fixed-right"]//a[contains(text(), "test_name2")]/../../..//span[text()="完善信息"]')

    # 列表第一条完善信息
    pertect_info3 = (By.XPATH, '//div[@class="el-table__fixed-right"]//a[contains(text(), "test_name3")]/../../..//span[text()="完善信息"]')

    # 列表第一条完善信息
    pertect_info4 = (By.XPATH, '//div[@class="el-table__fixed-right"]//a[contains(text(), "test_name4")]/../../..//span[text()="完善信息"]')

    # 手机号输入框
    phone = (By.XPATH, '//input[@placeholder="请输入手机号"]')

    # 身份证输入框
    id = (By.XPATH, '//input[@placeholder="请输入身份证号"]')

    # 确定按钮
    pertect_info_sure = (By.XPATH, '//div[@class="el-form-item submit el-form-item--medium"]/div/div/button/span')

    # 批量导入人脸信息Input标签
    batch_input_face = (By.XPATH, '//input[@multiple="multiple"]')

    # 批量导入人脸确定按钮
    batch_input_sure = (By.XPATH, '//span[@class="dialog-footer"]/button[2]/span')

    # 系统提示信息
    system_tip = (By.XPATH, '//div[@class="el-message el-message--success"]/p')
